Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for getParsedJSONAssignment method returning JsonNode (FF-896) #26

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

leoromanovsky
Copy link
Member

@leoromanovsky leoromanovsky commented Sep 13, 2023

description

note to reviewers: the diff of EppoClientTest.java is a little strange reviewing side by side please take care.

testing

unit tests access json via the parsed method in order to exercise both the JsonNode and String return types.

@leoromanovsky leoromanovsky marked this pull request as ready for review September 13, 2023 02:02
Copy link
Collaborator

@aarsilv aarsilv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📈

@@ -258,7 +260,7 @@ public Optional<Double> getDoubleAssignment(String subjectKey, String experiment
* @param subjectAttributes
* @return
*/
public Optional<String> getJSONAssignment(String subjectKey, String experimentKey,
public Optional<String> getJSONStringAssignment(String subjectKey, String experimentKey,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

* @param subjectAttributes
* @return
*/
public Optional<JsonNode> getParsedJSONAssignment(String subjectKey, String experimentKey,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Comment on lines +166 to +168
assertEquals(testCase.expectedAssignments, actualJSONAssignments.stream()
.map(node -> node.toString())
.collect(Collectors.toList()));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@leoromanovsky leoromanovsky merged commit ca9c039 into main Sep 13, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants